home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
baswind.arc
/
BASWIND.MRG
< prev
next >
Wrap
Text File
|
1985-10-03
|
3KB
|
61 lines
55000 '************************** WINDOW SUBROUTINE ****************************
55010 IF GROW=0 THEN GOSUB 55170:GOTO 55150
55020 '-------------------- Growing Window Module ------------------------------
55030 SHADOW=0
55040 X1%=ULC+INT((LRC-ULC)/2)
55050 X2%=LRC-INT((LRC-ULC)/2)
55060 Y1%=ULR+INT((LRR-ULR)/2)
55070 Y2%=LRR-INT((LRR-ULR)/2)
55080 IF X1%>ULC THEN X1%=X1%-3:IF X1%<ULC THEN X1%=ULC
55090 IF X2%<LRC THEN X2%=X2%+3:IF X2%>LRC THEN X2%=LRC
55100 IF Y1%>ULR THEN Y1%=Y1%-1
55110 IF Y2%<LRR THEN Y2%=Y2%+1
55120 GOSUB 55180
55130 IF (X1%=ULC) AND (X2%=LRC) AND (Y1%=ULR) AND Y2%=(LRR) THEN 55140 ELSE 55080
55140 GROW=0
55150 RETURN :'<<=== SUBROUTINE EXIT POINT
55160 '------------------- Regular Window Module -------------------------------
55170 X1%=ULC:X2%=LRC:Y1%=ULR:Y2%=LRR
55180 PAGE%=0:ATTR%=(BACK AND 7)*16+FORE
55190 ON FRAME GOSUB 55400,55450,55500,55550
55200 IF LABEL$="" OR LEN(LABEL$)>(LEN(TOP$)-5) THEN 55230
55210 MID$(TOP$,2)="["+LABEL$+"]"
55220 '---------------------------- Shadow Module ------------------------------
55230 IF SHADOW=0 THEN 55300
55240 COL%=X1%-3:DAT$=STRING$((X2%-X1%)+3,32):BLACK%=0
55250 FOR I%=Y1% TO (Y2%+2)
55260 ROW%=I%:CALL XQPRINT(DAT$,ROW%,COL%,BLACK%,PAGE%)
55270 NEXT I%
55280 SHADOW=0
55290 '------------------------ Produce Window Module --------------------------
55300 ROW%=Y1%-1:COL%=X1%-1
55310 CALL XQPRINT(TOP$,ROW%,COL%,ATTR%,PAGE%)
55320 FOR I%=Y1% TO Y2%
55330 ROW%=I%:COL%=X1%-1
55340 CALL XQPRINT(MIDL$,ROW%,COL%,ATTR%,PAGE%)
55350 NEXT I%
55360 ROW%=Y2%+1:COL%=X1%-1
55370 CALL XQPRINT(BOTTM$,ROW%,COL%,ATTR%,PAGE%)
55380 RETURN
55390 '----------------------- Single Line Frame -------------------------------
55400 TOP$=CHR$(218)+STRING$((X2%-X1%)+1,196)+CHR$(191)
55410 MIDL$=CHR$(179)+STRING$((X2%-X1%)+1,32)+CHR$(179)
55420 BOTTM$=CHR$(192)+STRING$((X2%-X1%)+1,196)+CHR$(217)
55430 RETURN
55440 '----------------------- Double Line Frame -------------------------------
55450 TOP$=CHR$(201)+STRING$((X2%-X1%)+1,205)+CHR$(187)
55460 MIDL$=CHR$(186)+STRING$((X2%-X1%)+1,32)+CHR$(186)
55470 BOTTM$=CHR$(200)+STRING$((X2%-X1%)+1,205)+CHR$(188)
55480 RETURN
55490 '------------- Double Vertical, Single Horizontal Line Frame -------------
55500 TOP$=CHR$(214)+STRING$((X2%-X1%)+1,196)+CHR$(183)
55510 MIDL$=CHR$(186)+STRING$((X2%-X1%)+1,32)+CHR$(186)
55520 BOTTM$=CHR$(211)+STRING$((X2%-X1%)+1,196)+CHR$(189)
55530 RETURN
55540 '------------- Double Horizontal, Single Vertical Line Frame -------------
55550 TOP$=CHR$(213)+STRING$((X2%-X1%)+1,205)+CHR$(184)
55560 MIDL$=CHR$(179)+STRING$((X2%-X1%)+1,32)+CHR$(179)
55570 BOTTM$=CHR$(212)+STRING$((X2%-X1%)+1,205)+CHR$(190)
55580 RETURN
55590 '********************* END OF WINDOW SUBROUTINE **************************
G$((X2%